<template>
  <div>
      <router-view></router-view>
    <van-tabbar v-model="active" @change="onChange">
      <van-tabbar-item icon="home-o">首页</van-tabbar-item>
      <van-tabbar-item icon="search" to='/search'>搜索</van-tabbar-item>
      <van-tabbar-item icon="apps-o">分类</van-tabbar-item>
      <van-tabbar-item icon="manager-o">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
    data() {
        return {
            active:0,
        }
    },
    methods:{
        onChange:function (val) {
            this.active = val

        },
    }
};
</script>

<style lang="scss" scoped>
</style>